/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package lab_2;

/**
 *
 * @author bellis
 */
public class Person {
    String name = "";
    int age = 0;
    public String getName(){
        return name;
    }
    public void setName(String name){
        this.name = name;
    }
    public int getAge(){
        return age;
    }
    public void setAge(int age){
        this.age = age;
    }
    //if name = “Andy” the returned string should be “ydnA”.
    public void reverseName(){
        StringBuilder stringBuilder = new StringBuilder(name);
        System.out.println(stringBuilder.reverse());
    }    
}
